/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package technic_RM_ResponseTimeNB.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

import technic_RM_ResponseTimeNB.*;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class Technic_RM_ResponseTimeNBFactoryImpl extends EFactoryImpl implements Technic_RM_ResponseTimeNBFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static Technic_RM_ResponseTimeNBFactory init() {
		try {
			Technic_RM_ResponseTimeNBFactory theTechnic_RM_ResponseTimeNBFactory = (Technic_RM_ResponseTimeNBFactory)EPackage.Registry.INSTANCE.getEFactory("http://technic_RM_ResponseTimeNB"); 
			if (theTechnic_RM_ResponseTimeNBFactory != null) {
				return theTechnic_RM_ResponseTimeNBFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new Technic_RM_ResponseTimeNBFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Technic_RM_ResponseTimeNBFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case Technic_RM_ResponseTimeNBPackage.RESPONSE_TIME_RMNB: return createResponseTimeRMNB();
			case Technic_RM_ResponseTimeNBPackage.TASK_RESULT: return createTaskResult();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object createFromString(EDataType eDataType, String initialValue) {
		switch (eDataType.getClassifierID()) {
			case Technic_RM_ResponseTimeNBPackage.STATUS:
				return createStatusFromString(eDataType, initialValue);
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String convertToString(EDataType eDataType, Object instanceValue) {
		switch (eDataType.getClassifierID()) {
			case Technic_RM_ResponseTimeNBPackage.STATUS:
				return convertStatusToString(eDataType, instanceValue);
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ResponseTimeRMNB createResponseTimeRMNB() {
		ResponseTimeRMNBImpl responseTimeRMNB = new ResponseTimeRMNBImpl();
		return responseTimeRMNB;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TaskResult createTaskResult() {
		TaskResultImpl taskResult = new TaskResultImpl();
		return taskResult;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Status createStatusFromString(EDataType eDataType, String initialValue) {
		Status result = Status.get(initialValue);
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
		return result;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertStatusToString(EDataType eDataType, Object instanceValue) {
		return instanceValue == null ? null : instanceValue.toString();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Technic_RM_ResponseTimeNBPackage getTechnic_RM_ResponseTimeNBPackage() {
		return (Technic_RM_ResponseTimeNBPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static Technic_RM_ResponseTimeNBPackage getPackage() {
		return Technic_RM_ResponseTimeNBPackage.eINSTANCE;
	}

} //Technic_RM_ResponseTimeNBFactoryImpl
